package com.qifn.blog.Dao;

import com.qifn.blog.Model.Blog;
import com.qifn.blog.Model.Tag;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BlogDao {
    List<Blog> adminIndexQueryAllBlog();
    List<Blog> adminIndexSearchBlog(String title,String typeId,String recommend);
    Integer adminReleaseInsertBlog(@Param("blog") Blog blog);
    Integer adminReleaseInsertBlog_Tag(Integer blogId,@Param("tagIdList") List<Tag> tagList);
    Blog adminUpdateQueryBlog(Integer blogId);
    Integer adminDeleteBlg_TagByBlogId(Integer blogId);
    Integer adminReleaseUpdateBlog(@Param("blog") Blog blog);
    Integer adminUpdateInsertBlog_Tag(Integer blogId,@Param("tagIdList") List<Tag> tagList);
    Integer adminIndexDeleteBlog(Integer blogId);
    List<Blog> indexQueryBlog();
    List<Blog> indexQueryRecommendBlog();
    List<Blog> queryBlogByTypeId(Integer typeId);
    List<Blog> queryBlogByTagId(Integer tagId);
    Blog queryBlogByBlogId(Integer blogId);
    List<Blog> indexSearchBlog(String keyword);
}
